<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html>
<head>
<base href="<%=basePath%>">
<title>${appInfo.appName }</title>
<link href="/assets/css/dpl-min.css" rel="stylesheet" type="text/css" />
<link href="/assets/css/bui-min.css" rel="stylesheet" type="text/css" />
<link href="/assets/css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<div class="header">
		<div class="dl-title">
			<span class="">${appInfo.appName }</span>
		</div>
		<div class="dl-log">
			欢迎您，<span class="dl-log-user">${user.deptName }</span> <a href="javascript:void();" title="退出系统" onclick="logout();"
				class="dl-log-quit">[退出]</a>
		</div>
	</div>
	<div class="content">
		<div class="dl-main-nav">
			<ul id="J_Nav" class="nav-list ks-clear">
				<li class="nav-item dl-selected"><div
						class="nav-item-inner nav-storage">于都县残联</div></li>
			</ul>
		</div>
		<ul id="J_NavContent" class="dl-tab-conten">

		</ul>

	</div>
	<script type="text/javascript" src="/assets/js/jquery-1.8.1.min.js"></script>
	<script type="text/javascript" src="/assets/js/bui-min.js"></script>
	<script type="text/javascript" src="/assets/js/config-min.js"></script>
	<script language="javascript">
		BUI.use('common/main', function() {
			var config = [ {
				id : 'menu',
				homePage:'welcome',
				menu : [ {
					text : '欢迎页面',
					items : [ {
						id : 'welcome',
						text : '首页',
						closeable : false,
						href : 'admin/welcome'
					} ]
				},{
					text : '信息录入',
					items : [{
						id : 'info-all',
						text : '建档立卡',
						href : 'admin/all'
					}, {
						id : 'second-menu',
						text : '信息导出',
						href : 'main/second'
					} ]
				},{
					text : '管理员信息管理',
					items : [ {
						id : 'main-menu2',
						text : '修改密码',
						href : 'main/menu.php'
					}, {
						id : 'second-menu2',
						text : '关联手机',
						href : 'main/second-menu.php'
					}, {
						id : 'second-menu3',
						text : '新增录入员',
						href : 'main/second-menu.php'
					} ]
				} ]
			}, {
				id : 'search',
				menu : [ {
					text : '搜索页面',
					items : [ {
						id : 'introduce',
						text : '搜索页面简介',
						href : 'search/introduce.html'
					} ]
				} ]
			} ];
			new PageUtil.MainPage({
				modulesConfig : config
			});
		});
		function logout(){
			seajs.use(['bui/cookie'], function(cookie){
				$.ajax({
	                url : '/logout',
	                type : 'post',
	                cache : false,
	                dataType : 'json',
	                success : function( data ){
	                    if ( data.result==1) {
	                        // 退出成功
	                        BUI.Message.Alert( data.msg,function(){
	                        	cookie.remove('username');
		                        window.location = '/';
	                        }, 'success' );
	                    }  
	                }
	            });
			});
		}
	</script>
</body>
</html>
